Talk:How does the battle system work?
=Advanced Calculations= I've been working for a while now trying to figure out precisely how losses are determined in an equal population, equal ship environment since that shouldn't be effected by morale. Once someone can figure this out, it needs to be added to the correct section. Once that is determined, we can add the section on the Morale system as it directly effects losses. ~Markus 17:41, May 30, 2010 (UTC) What I do not know is how exactly Morale effects losses. Haven't gone there yet. What I can tell you is how to calculate losses. I don't like the term "rounds", but I'll stick with it. Calculate the "rounds" for each side, divide them, then raise to the 0.8 power. The result is expressed in a percentage (the casualty percentage). If the number is greater than 1, then 100% of that side dies. Take the 48 Heavy Cruisers vs 31 Carriers that is the classic example given. The rounds are 1.5417 v 7.5871 (I always take everything out to 4 digits when I can - it's a long-time habit). Divide them into each other and you get 0.2302 ( 1.5417 / 7.5871 ) and 4.9213 ( 7.5871 / 1.5417 ). I call this the "battle ratio" btw. Raise this "battle ratio" to the 0.8 power. This becomes the "casualty percentage", with anything 1 or more equalling 100% loss for that side. 0.2302 becomes 27.95% and 4.9 becomes 3.5782 (ie 100% loss). The Cruisers lose 13.4147 units, Carriers all die. Round 13.4147 down to 13, and whaddayaknow? It matches the combat simulator. Normal raids are calculated with the formula x/(x+1), where x is the "attack casualty percentage". This gives us the "raid casualty percentage". It gets tricky, though, since the way the game handles Xen raid casualties is different than it does for Terrans and Titans. Xen take less damage from raiding than the others do. Take a quick example from the combat simulator.... common sense tells us that if 100 Delphi attack 100 Delphi, than they all die. That's true. If it's a raid then we would expect a casualty of 0.5 ( 1 / (1+1) ). And that's true as well. But take 100 Mylons against 100 Mylons and the result of the raid is an even 20%.... so the rules change a little for Xen! Yet another glorious, convoluted wrinkle.... Sofl 02:32, May 31, 2010 (UTC) Sofl : Thanks Sofl, that'll help loads. Jack posted the Morale formula somewhere, but I can't for the life of me remember where. All I remember is that is applied to the total losses AFTER all other bonuses. So, basically, if your losses were 20%, the morale formula would work from that. Increasing it based on population and ship count differences. ~Markus 01:37, June 2, 2010 (UTC) :EDIT: Something that just occurred to me, have you calculated out how combat works on comets yet? I may as well add that in if it's already known. Xen Raiding and Additional Modifiers Okay, I'm working on figuring out the Xen raiding formula. Right now, I'm sticking with simple. I decided to test out (x/x+4), since it works for the example given and gives me a place to start. I'll be gathering data and running tests to figure it out, unless Sofl beats me too it. <.< Also, The additional modifiers still needs something before I can call it good to go. I know from Kiriloid that: :"Penalty appears only if larger player have more powerful fleet, and it works not like direct penalty. :With no moralebonus superiority of larger fleet is (off/def)^1.6" :"If both population and fleet's combat power of one side are bigger than the same values for another side, just replace 1.6 in formula with 1.1 + 0.5 * √/ bigger_pop"http://forum.imperion.org/showthread.php?p=97088#post97088 However, my example fleet yields higher losses for the Titan when points are considered (I swapped them so that the winning fleet had a higher pop) even though fleet sizes are the same. This leads me to believe that there is a third formula for when only points differ. According to the combat sim, it's only a difference of 2%. ~Markus 03:34, June 2, 2010 (UTC) :Okay, I haven't really been doing much of any testing at all. I have confirmed that my basic starting point is, most definitely, not correct, but beyond that I can't speculate right now. I have run a couple of tests, and I think Xen raiding may actually effect the defender as well as the attacker. This makes sense, when you think about it. If it didn't work like this, Xen would always be able to beat out Terrans and Titans because they would always take less damage. ~Markus 13:25, June 16, 2010 (UTC) Xen raiding Soflpedia > Xen Raiding So the short answer is that I have *a* solution, but I had to break it up into two different formulas. My approach is to define a "winning" and "losing" side in Xen raiding - the "losing" side being the one with the higher attack casualties. In other words, if the Xen would have attacked instead of raided, and the defender would have died, the defender is the "losing" side. The "losing" equation is x / (x + 4), where x is the attack casualties. So, an attack casualty of "1" would become 1/5, or 20%, which is exactly what we see when we have, say, 500 Mylons raid 500 Mylons - 100 of each die. The tricky part is defining the raid casualties for the "winning" side. This one stumped me for a while, but I've finally come up with two different ways to model it. The first is by using two raid formulas in a row... to quote my blog, formula 1 : x = attack casualties / (attack casualties + 1) formula 2 : raid casualties = (x + 0.12) / (x + 2.6) All I can say is that it works pretty well - it's reasonably accurate over the spread of results (over 97% accurate, at least). The second way of modeling Xen raiding is using a third order polynomial (thank you, polynomial curve-fitting!). It is detailed in my blog, and is over 98% accurate. Um, I didn't go into comet raiding, but it's based on the x/(x+y) formula. Don't remember exact numbers at this point, but I think it's pretty similar to the Xen "losing" formula, ie 4, 5, 6, somewhere in there. I'm not happy that I didn't get the "right" formula down... but I did pretty well for an approximation. Sofl 03:57, October 20, 2010 (UTC)Sofl